Message Window is a tiny (PartWare) application for displaying text messages. When you just need a place to post a small amount of text and don't want the overhead of a scriptable text editor, or the modality of Display Dialog, Message Window is there.
Message Window supports the Apple Object Model and is attachable. When a message is posted to Message Window, an optional alert action is taken. Supported alerts include playing a beep sound, flashing the window, or coming immediately to the foreground. Any combination of these alerts may be used, or none at all. Rather than add code to the application for saving preferences, an attachments script is used to maintain settings such as window size and position, and alert notification style.
If a compiled script named "Attachments" is found in the same folder as Message Window, any attachable events will be routed to it first. Currently the "run" and "quit" AppleEvents can be caught, and the sample Attachments script illustrates saving and restoring application preferences in these handlers. It is important to continue the events out of the Attachments handlers so the application gets a chance to handle them, and this is especially important with the quit event. To temporarily disable the Attachments script, hold down the option key when starting up or quiting Message Window (anytime the script would normally be passed an event, you can use the option key to bypass execution).
-----------
The easiest way to post a message to Message Window is with the following lines of AppleScript:
tell application "Message Window"
display "Hello"
end tell
However, since Message Window supports Apple's Object Model, you may also get and set the message property of the window with lines like the following:
tell application "Message Window"
set message of window 1 to "Hello"
get message of window "Message Window"
end tell
Message widow can be configured to alert you when a new message arrives. The three supported alert methods are beeping, flashing the window, and coming immediately to front. You can choose any combination of these alerts or none at all by setting the application property called "notification type" (note: this should probably be a window property since with multiple window support you could use different notifications for each window).
When changing the position or bounds of Message Window, there is no checking done to see if the new position will keep the window on the screen. This was an explicit design choice to enable the window to be moved off the screen and get it out of the way. There are two ways you can get it back on screen again: 1) either disable the run handler by launching it and holding down the option key, or just move the attachments script out of the folder (this assumes that you are still saving and restoring Message Window's bounds with the Attachments script), or 2) hit cmd-tab and the window will be moved to a default location on the main screen.
The smallest bounds you can set Message Window to is 32x32 pixels.
The rest of Message Window's events and properties are documented in the application's terminology dictionary. Use Script Editor to view the dictionary.
Limitations
__________________
- Only supports a single window
- Can't select text in the window
- Only displays the most recently posted message
Still to do...
__________________
Since Message Window is a freebie toy, there are no guarantees that it will be updated in future. There are a couple features I plan to add when there's time, the first is the ability to catch "display" AppleEvents so that the incoming messages can be filtered by a script, and there definately needs to be a way to change what the default beep sound is. These are easy and will come soon. I may also get ambitious enough one day to support multiple windows, however any requests along the lines of "can you support scrolling... styled text.... doing my laundry...." will be ignored since those belong to a different product: Message Window's big brother. Nevertheless, I'd like to hear any and all comments on Message Window, especially ones telling me I screwed something up. So please E-mail your musings and wishes since a free product doesn't generate much else for its author. I'm reachable at wkw@futuris.net, or any of the addresses listed elsewhere in this document.
I'd also like to add a scripts menu for attached extension scripts, but I'm not convinced of the utility of such a feature for this micro-application yet. OSA menu already exists...
I'll also create a PowerPC native version one of these days just to say it exists, but since performance is such a non-issue with MW, there's really no rush to get it done.
Credits:
__________________
Message Window uses Troy Gaul's excellent Infinity Windoid, and many thanks to Troy for the hundreds of hours he has spent perfecting it.
Thanks to Mark Alldritt of Late Night Software for the concept of using an Attachments script to override application behavior. Earlier versions of Message Window relied on separate Startup and Shutdown scripts, but having become a recent Script Debugger user, I was quickly won over to his design for attachability.
To receive more information about Script Debugger or other Late Night Software products, send E-mail to Alldritt@wimsey.com.
_________________________________________
Message Window is a free product from Acme Technologies and may be used for any non-commercial purposes, but may not be sold or uploaded to any on-line service, nor distributed on CD-ROM, disk, or BBSs without written permission from Acme Technlogies. Message Window is Copyright 1995 by Wayne K. Walrath and Acme Technologies, and all rights are reservered. Acme Technologies is a publisher of tools for AppleScript and Internet publishing. For information about Acme products or services, send E-mail to Acme@kagi.com.
Other ways to reach Wayne Walrath and Acme Technologies: